package payment;

import java.rmi.RemoteException;


public class PaymentMethodFactory {
	public static IPaymentMethod create(String s) {
		try {
			if (s.equals("Card")) {
				return new Card();
			} else if (s.equals("PayPal")) {
				return new PayPal();
			} else
				return null;
		} catch (RemoteException e) {
			e.printStackTrace();
			return null;
		}
	}
}
